//- Copyright (C) 2023 Beijing Huaxia Chunsong Technology Co., Ltd. 
//- <https://www.chatopera.com>, Licensed under the Chunsong Public 
//- License, Version 1.0  (the "License"), https://docs.cskefu.com/licenses/v1.html
//- Unless required by applicable law or agreed to in writing, software
//- distributed under the License is distributed on an "AS IS" BASIS,
//- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//- See the License for the specific language governing permissions and
//- limitations under the License.
//- Copyright (C) 2018-Jun. 2023 Chatopera Inc, <https://www.chatopera.com>
//- Licensed under the Apache License, Version 2.0
//- http://www.apache.org/licenses/LICENSE-2.0
// <#include "/public/macro.html">
.uk-layui-form
    form.layui-form(action='/apps/contacts/impsave.html', enctype='multipart/form-data', method='post')
        if ckind
            input(type="hidden" name="ckind" value= ckind)
        .layui-collapse
            .layui-colla-item
                h2.layui-colla-title 选择导入的数据文件
                .layui-colla-content.layui-show
                    .layui-form-item
                        .layui-inline
                            label.layui-form-label 数据文件：
                            .layui-input-inline
                                .layui-box.layui-upload-button(style='width: 100%;')
                                    input.layui-upload-file(type='file', name='cusfile', required, lay-verify='required', accept='application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', lay-ext='jpg|png|gif', onchange='$(\'#cus_file\').html($(this).val());')
                                    span.layui-upload-icon
                                        i.layui-icon 
                        .layui-inline
                            font(color='red') *（必填项）
                            |  (需要导入的联系人数据Excel文件)
                            a(href='/res/template.html?filename=contacts_template.xlsx', target='_blank', style='margin-left:20px;')
                                i.layui-icon 
                                | 下载模板
                    .layui-form-item(style='height:40px;line-height:40px;')
                        .layui-inline
                            label.layui-form-label
                            .layui-input-inline#cus_file(style='width:500px;').
            .layui-colla-item
                h2.layui-colla-title 联系人信息导入说明，导入步骤：
                .layui-colla-content.layui-show
                    .layui-form-item
                        .layui-inline
                            label.layui-form-label#cusname 第一步：
                            .layui-input-inline(style='width:auto;padding-top:9px;') 上传联系人数据的Excel文件
                    .layui-form-item
                        .layui-inline
                            label.layui-form-label#cusname 第二步：
                            .layui-input-inline(style='width:auto;padding-top:9px;') 选择Excel里的列与系统联系人的字段对应关系
                    .layui-form-item
                        .layui-inline
                            label.layui-form-label#cusname 第三步：
                            .layui-input-inline(style='width:auto;padding-top:9px;') 开始导入联系人数据
            .ukefu-imp-tips.
                自动匹配联系人导入字段功能，无需下载模板，系统自动匹配，客户数据直接导入，使用更加方便、快捷、智能。
        .layui-form-button
            .layui-button-block
                button.layui-btn(lay-submit, lay-filter='formDemo') 立即导入
script.
    layui.use('upload', function(){
            var target = $(this).attr("data-target");
        });
        layui.use('form', function(){
          var form = layui.form();
          form.render();
        });
            
